/*
** convert_to_base.c for  in /home/georgi_v/rendu/PSU_2013_my_printf
** 
** Made by georgi_v
** Login   <georgi_v@epitech.net>
** 
** Started on  Sun Nov 17 12:32:20 2013 georgi_v
** Last update Fri Dec  6 18:39:20 2013 georgi_v
*/

#include "my.h"

int		convert_to_base(unsigned int num, char *str_base)
{
  int		base;
  int		tmp;
  static int	cnt = 0;

  base = my_strlen(str_base);
  if (num != 0)
    {
      convert_to_base(num/base, str_base);
      cnt++;
      tmp = num % base;
      my_putchar(str_base[tmp]);
    }
  return (cnt);
}
